home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 7
/
Amoszine 7 (Disk 3 of 3).adf
/
ARCHIVES
/
AJC_More_Source.lha
/
AJC-TurboStars&Cubes.AMOS
/
AJC-TurboStars&Cubes.amosSourceCode
Wrap
AMOS Source Code
|
1995-06-01
|
2KB
|
105 lines
'
' *** REQUIRES TURBO PLUS EXTENSION! **
'
' Boxes & Starfield.
' By Andy Campbell >8^)
'
' COMPILE FOR JAW-DROPPINGLY SMOOTH SPEED!
'
'
Dim PT(12,6)
Dim CUBE(9,3)
_NUMBER_OF_CUBES=4
Screen Open 0,320,200,2,Lowres
Ink 1,0
Palette $12,$FFF
Hide On
Gosub SMEG
Extension_12_0016
Screen 0
Extension_12_02BE 160,100
Double Buffer
Autoback 0
Extension_5_003A
AANTAL=100
Dim SPEED(AANTAL)
Dim X_AS(AANTAL)
Shared AANTAL,X_AS(),SPEED()
For I=1 To AANTAL
SPEED(I)=Rnd(2)+1
X_AS(I)=Rnd(310)
Extension_12_036E X_AS(I),Y,1
Add Y,2
Next
Repeat
For J=1 To _NUMBER_OF_CUBES
Dec CUBE(J,3)
If CUBE(J,3)<5 : CUBE(J,3)=1000 : End If
For I=1 To 12
Extension_12_02A6 PT(I,1)+CUBE(J,1),PT(I,2)+CUBE(J,2),PT(I,3)+CUBE(J,3) To PT(I,4)+CUBE(J,1),PT(I,5)+CUBE(J,2),PT(I,6)+CUBE(J,3)
Next I
Next J
SET_STARS
CLEAR_STARS
Screen Swap
Wait Vbl
Extension_12_0380 -1
Until Mouse Key
Extension_12_0006
Edit
SMEG:
Restore GIT
For I=1 To 12
For J=1 To 6
Read PT(I,J)
Next J
Next I
Restore GIT2
For I=1 To _NUMBER_OF_CUBES
For J=1 To 3
Read CUBE(I,J)
Next J
Next I
Return
GIT:
Data 0,0,0,50,0,0
Data 50,0,0,50,0,50
Data 50,0,50,0,0,50
Data 0,0,50,0,0,0
Data 0,0,0,0,50,0
Data 0,50,0,50,50,0
Data 50,50,0,50,50,50
Data 50,50,50,0,50,50
Data 0,50,50,0,50,0
Data 0,50,50,0,0,50
Data 50,50,50,50,0,50
Data 50,50,0,50,0,0
GIT2:
Data -25,-100,710
Data -75,100,500
Data -35,-175,200
Data 55,150,300
Procedure SET_STARS
For I=1 To AANTAL
Extension_12_036E X_AS(I),Y,1
Add Y,2
Next
End Proc
Procedure CLEAR_STARS
For I=1 To AANTAL
Add X_AS(I),SPEED(I),0 To 310
Next
End Proc